<?php 
	namespace Index\Model;
	use Think\Model;
/**
 * 用户表模型
 */
	class UserModel extends Model {		
		public function checkEmail($email)
		{		
			// $preg="//";

			$res=M('user')->where("email='$email'")->find();
			// var_dump($res);
			if ($res) {
				Reajax(1,"邮箱已注册");
			}

		}
		public function checkNickname($nickname)
		{		

			$res=M('user')->where("nickname='$nickname'")->find();

			if ($res) {
				Reajax(1,"昵称已注册");
			}
			
		}
		
		

	};




 ?>